import { req_login } from '@/api/registerLoging';
export default {
    async login_a({commit},{user_name,password,routerT}){
        let result = await req_login({method:'post',url:'/login',arg:{user_name,password},headerType:'form'});
        if(result.data.info == '登录成功'){
            routerT.push({
                name:'home'
            })
        }
        commit('login',{user_name,info:result.data.info,token:result.data.token});
    }
}